package 抽象;

public class test {
    public static void main(String[]args){
        Mainboard mb=new Mainboard();
        Toshiba tsb=new Toshiba();
        mb.insert(tsb);
        mb.delete(tsb);
        Kingston ks=new Kingston();
        mb.insert(ks);
        mb.delete(ks);
        //匿名内部类
        USB qc=new USB() {
            @Override
            public void start() {
                System.out.println("七彩U盘启动");
            }

            @Override
            public void stop() {

                System.out.println("七彩U盘关闭");
            }
        };
        mb.insert(qc);

    }
}
